package server;


import java.util.List;

/**
 *
 */
public class Mapper {

    private List<MappedHost> mappedHosts;

    public List<MappedHost> getMappedHosts() {
        return mappedHosts;
    }

    public void setMappedHosts(List<MappedHost> mappedHosts) {
        this.mappedHosts = mappedHosts;
    }

    //对应host标签
    protected final class MappedHost {
        private String host;
        private String appBase;
        private List<MappedContext> mappedContexts;

        public String getHost() {
            return host;
        }

        public void setHost(String host) {
            this.host = host;
        }

        public String getAppBase() {
            return appBase;
        }

        public void setAppBase(String appBase) {
            this.appBase = appBase;
        }

        public List<MappedContext> getMappedContexts() {
            return mappedContexts;
        }

        public void setMappedContexts(List<MappedContext> mappedContexts) {
            this.mappedContexts = mappedContexts;
        }
    }

    //发布的应用文件夹访问路径
    protected final class MappedContext {
        private String app;

        private List<MappedWrapper> mappedWrappers;

        public String getApp() {
            return app;
        }

        public void setApp(String app) {
            this.app = app;
        }

        public List<MappedWrapper> getMappedWrappers() {
            return mappedWrappers;
        }

        public void setMappedWrappers(List<MappedWrapper> mappedWrappers) {
            this.mappedWrappers = mappedWrappers;
        }
    }

    //封装项目内web.xml配置的servlet
    protected class MappedWrapper {
        private String servletClass;
        private String urlPattern;

        private HttpServlet httpServlet;


        public String getServletClass() {
            return servletClass;
        }

        public void setServletClass(String servletClass) {
            this.servletClass = servletClass;
        }

        public String getUrlPattern() {
            return urlPattern;
        }

        public void setUrlPattern(String urlPattern) {
            this.urlPattern = urlPattern;
        }

        public HttpServlet getHttpServlet() {
            return httpServlet;
        }

        public void setHttpServlet(HttpServlet httpServlet) {
            this.httpServlet = httpServlet;
        }
    }


}
